package com.osgix.common.pojo;

import java.io.Serializable;

/**
 * <b>权限点属性类型</b>
 * <b>@author zqmao 2007-7-30,下午04:33:38</b>
 * <b>version 1.0</b>
 */
public class PropertyType implements Serializable {

	private static final long serialVersionUID = -8731834180689353289L;

	/**
	 * 属性编号
	 */
	String propertyId = "";

	/**
	 * 属性名称
	 */
	String name = "";

	/**
	 * 字典表名称
	 */
	String dictTable = "";

	/**
	 * 字典主键
	 */
	String dictKey = "";

	/**
	 * 字典显示属性
	 */
	String dictDesc = "";

	/**
	 * 字典查询条件
	 */
	String dictWhere = "";

	/**
	 * 维度字段类型 0：文本；1：单选；2：多选
	 */
	int fieldType = 0;

	/**
	 * 构造函数
	 *
	 */
	public PropertyType() {
	}

	/**
	 * 全参构造函数
	 * @param propertyId
	 * @param name
	 */
	public PropertyType(String propertyId, String name) {
		this(propertyId, name, "", "", "", "", 0);
	}

	/**
	 * 全参构造函数
	 * @param propertyId
	 * @param name
	 */
	public PropertyType(String propertyId, String name, String dictTable, String dictKey, String dictDesc,
			String dictWhere, int fieldType) {
		this.propertyId = propertyId;
		this.name = name;
		this.dictTable = dictTable;
		this.dictKey = dictKey;
		this.dictDesc = dictDesc;
		this.dictWhere = dictWhere;
		this.fieldType = fieldType;
	}

	/**
	 * 克隆方法
	 */
	public Object clone() {
		PropertyType newType = new PropertyType(propertyId, name, dictTable, dictKey, dictDesc, dictWhere, fieldType);
		return newType;
	}

	/**
	 * 
	 */
	public String toString() {
		return name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPropertyId() {
		return propertyId;
	}

	public void setPropertyId(String propertyId) {
		this.propertyId = propertyId;
	}

	public String getDictDesc() {
		return dictDesc;
	}

	public void setDictDesc(String dictDesc) {
		this.dictDesc = dictDesc;
	}

	public String getDictKey() {
		return dictKey;
	}

	public void setDictKey(String dictKey) {
		this.dictKey = dictKey;
	}

	public String getDictTable() {
		return dictTable;
	}

	public void setDictTable(String dictTable) {
		this.dictTable = dictTable;
	}

	public String getDictWhere() {
		return dictWhere;
	}

	public void setDictWhere(String dictWhere) {
		this.dictWhere = dictWhere;
	}

	public int getFieldType() {
		return fieldType;
	}

	public void setFieldType(int fieldType) {
		this.fieldType = fieldType;
	}
}
